package action.auth;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import service.interf.security.IMenu;

import com.opensymphony.xwork2.ActionSupport;

import dao.pojo.Menu;

public class LoginMenuAction extends ActionSupport {
	private static final long serialVersionUID = 1L;
	private IMenu menuImpl;
	private Map<String, List<Menu>> munuMap;

	public Map<String, List<Menu>> getMunuMap() {
		return munuMap;
	}

	public IMenu getMenuImpl() {
		return menuImpl;
	}

	public void setMenuImpl(IMenu menuImpl) {
		this.menuImpl = menuImpl;
	}

	// 根据登录的角色获取组菜单
	public String getGroupMenus() {
		HttpSession session = ServletActionContext.getRequest().getSession();
		munuMap = (Map<String, List<Menu>>) session.getAttribute("menuList");
		return "success";
	}
}
